#pragma once
#include "Structure.h"
#include "BasicOp.h"
#include "AdvanceOp.h"

namespace DL {
	Tensor3D<float>& DL::Conv(const Tensor3D<float>& tensor, int stride, int padding, int maxpoolSize, const Tensor4D<float>& weight, const Tensor1D<float>& bias)
	{
		Tensor3D<float>& convResult = Conv2D(tensor, stride, padding, weight, bias);
		Tensor3D<float>& reluResult = Relu(convResult);
		Tensor3D<float>& maxpoolResult = MaxPooling2D(reluResult, maxpoolSize, maxpoolSize, 0);
		delete& convResult;
		delete& reluResult;
		return maxpoolResult;
	}
	Tensor1D<float>& DL::FullConnect(const Tensor1D<float>& tensor, const Tensor2D<float>& weight, const Tensor1D<float>& bias)
	{
		Tensor1D<float>& linearResult = Linear(tensor, weight, bias);
		Tensor1D<float>& reluResult = Relu(linearResult);
		delete& linearResult;
		return reluResult;
	}
}